﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// FrameDict数据模型对象
    /// </summary>
    [Serializable]
    public partial class FrameDictMod
    {
        /// <summary>
        /// 初始化FrameDict数据模型对象
        /// </summary>
        public FrameDictMod()
        {
            
        }
        /// <summary>
        /// 初始化FrameDict数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        public FrameDictMod(string iD)
        {
            //给ID字段赋值
            this.ID = iD;
        }
        /// <summary>
        /// 初始化FrameDict数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="iNFO">INFO</param>
        /// <param name="xType">xType</param>
        /// <param name="caption">Caption</param>
        public FrameDictMod(string iD,string iNFO,string xType,string caption)
        {
            //给ID字段赋值
            this.ID = iD;
            //给INFO字段赋值
            this.INFO = iNFO;
            //给xType字段赋值
            this.XType = xType;
            //给Caption字段赋值
            this.Caption = caption;
        }
        
		//属性存储数据的变量
        private string _iD;
        private string _iNFO;
        private string _xType;
        private string _caption;
        
        /// <summary>
        /// ID
        /// </summary>
        public string ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// INFO
        /// </summary>
        public string INFO
        {
            get { return this._iNFO; }
            set { this._iNFO = value; }
        }
        /// <summary>
        /// xType
        /// </summary>
        public string XType
        {
            get { return this._xType; }
            set { this._xType = value; }
        }
        /// <summary>
        /// Caption
        /// </summary>
        public string Caption
        {
            get { return this._caption; }
            set { this._caption = value; }
        }
        
        /// <summary>
        /// 对比两个FrameDict数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的FrameDict数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成FrameDict数据模型对象
            FrameDictMod frameDictMod = obj as FrameDictMod;
            //判断是否转换成功
            if (frameDictMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == frameDictMod.ID &&
                //判断INFO是否一致
                this.INFO == frameDictMod.INFO &&
                //判断xType是否一致
                this.XType == frameDictMod.XType &&
                //判断Caption是否一致
                this.Caption == frameDictMod.Caption;
        }
        /// <summary>
        /// 将当前FrameDict数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将FrameDict数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                (this.ID == null ? 2147483647 : this.ID.GetHashCode()) ^
                //将INFO进行按位异或运算处理
                (this.INFO == null ? 2147483647 : this.INFO.GetHashCode()) ^
                //将xType进行按位异或运算处理
                (this.XType == null ? 2147483647 : this.XType.GetHashCode()) ^
                //将Caption进行按位异或运算处理
                (this.Caption == null ? 2147483647 : this.Caption.GetHashCode());
        }
        /// <summary>
        /// 将当前FrameDict数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前FrameDict数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID +
                "]";
        }
    }
}
